package edu.hunau.cxb18.spring.setter;

import java.util.*;

/**
 * Setter注入
 * @author hb
 * @create 2020-03-10 10:30
 */
public class Beans {
    //必须为属性提供setter方法
    private int id;
    private String datas;
    //需要注入的是spring容器管理的实例
    private Moo moo;

    private List list;
    private Set set;
    private int[] arr;

    private Map map;

    private Properties props;

    public Beans() {
    }


    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getDatas() {
        return datas;
    }

    public void setDatas(String datas) {
        this.datas = datas;
    }

    public List getList() {
        return list;
    }

    public void setList(List list) {
        this.list = list;
    }

    public Moo getMoo() {
        return moo;
    }

    public void setMoo(Moo moo) {
        this.moo = moo;
    }

    public Map getMap() {
        return map;
    }

    public void setMap(Map map) {
        this.map = map;
    }


    @Override
    public String toString() {
        return "Beans{" +
                "id=" + id +
                ", datas='" + datas + '\'' +
                ", moo=" + moo +
                ", list=" + list +
                ", set=" + set +
                ", arr=" + Arrays.toString(arr) +
                ", map=" + map +
                ", props=" + props +
                '}';
    }

    public Set getSet() {
        return set;
    }

    public void setSet(Set set) {
        this.set = set;
    }

    public int[] getArr() {
        return arr;
    }

    public void setArr(int[] arr) {
        this.arr = arr;
    }

    public Properties getProps() {
        return props;
    }

    public void setProps(Properties props) {
        this.props = props;
    }
}
